Skip to content

fix(tui): keep startup events before project loads#28025

Open
mturac wants to merge 1 commit into
anomalyco:devfrom
mturac:fix/27879-tui-event-project-race
Open

fix(tui): keep startup events before project loads#28025
mturac wants to merge 1 commit into
anomalyco:devfrom
mturac:fix/27879-tui-event-project-race

Conversation

@mturac
Copy link
Copy Markdown

@mturac mturac commented May 17, 2026

Issue for this PR

Fixes #27879

Type of change

  • Bug fix

What does this PR do?

Preserves non-sync TUI events while the current project is still loading, so startup events such as permission prompts and session status are not silently dropped before /project/current resolves.

Adds a regression test for project-scoped events emitted before the project context has synced.

How did you verify your code works?

  • bun test test/cli/tui/use-event.test.tsx --timeout 30000
  • bun typecheck
  • bunx prettier --check src/cli/cmd/tui/context/event.ts test/cli/tui/use-event.test.tsx
  • git diff --check
  • git push pre-push hook: bun turbo typecheck

Screenshots / recordings

Not applicable; event handling regression.

Checklist

  • I have tested this change locally.
  • I have added or updated tests where appropriate.
  • I have kept the change focused.

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels May 17, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TUI silently drops permission.asked events during project-lookup race → tool hangs forever → OOM

1 participant